home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10025 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  47 lines

  1. Path: surfnet.nl!sun4nl!xs4all!usenet
  2. From: brooz@xs4all.nl (Bart Roozendaal)
  3. Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.misc
  4. Subject: Using class members from DLL
  5. Date: Tue, 05 Mar 1996 16:24:27 GMT
  6. Organization: ROOS
  7. Message-ID: <313c67e1.4039445@news>
  8. NNTP-Posting-Host: asd05-03.dial.xs4all.nl
  9. X-Newsreader: Forte Agent .99d/32.182
  10.  
  11. Hi,
  12.  
  13. Using Microsoft Visual C++, version 1.5 I am looking a way to use a
  14. class stored in a DLL. How can I get access to the members of a class
  15. defined in a DLL from a program? Example:
  16.  
  17. // This is in a DLL
  18. class CTestList : public CListBox
  19. {
  20. public:
  21.    BOOL IsValid();
  22. };
  23.  
  24. // This is in a program
  25. ...
  26.    CTestList *test = new CTestList; // How to access the constructor
  27.    if (test->IsValid()) {
  28.       ...
  29.       }
  30.  
  31. Now, the problem is that I can't get the compiler find the public
  32. IsValid-member of the class. How do I export this 'function'? Do I
  33. have to use a different prototyping of the class? How can I get this
  34. working? I don't want to be writing C-code and use that as an
  35. interface to the class...
  36.  
  37. I hope this is clear enough. Help would be greatly appreciated.
  38.  
  39. Bye, Bart.
  40. P.S. If you can, please reply through emai.
  41. +---------------------------------------------+
  42. | B. Roozendaal (ROOS)                        |
  43. | brooz@xs4all.nl, home: www.xs4all.nl/~brooz |
  44. | De een is de ander niet,                    |
  45. |      en morgen is er weer een dag...        |
  46. +---------------------------------------------+
  47.